import { Transform } from 'class-transformer';
import { IsNumber, IsOptional, Min } from 'class-validator'

export class PageDto {

  /**
   * 页码
   */
  @IsNumber()
  @Min(1)
  @IsOptional()
  page: number = 1;

  /**
   * 每页条数
   */
  @IsNumber()
  @Min(1)
  @IsOptional()
  limit: number = 20;

  /**
   * 开始查询下标
   */
  @IsNumber()
  @IsOptional()
  start: number = 0;

  @IsOptional()
  premissionIds: number[] = [];
}